package com.banciyuan.bcywebview.biz.webdetail;

import com.banciyuan.bcywebview.biz.circles.smooth.CircleTagSmoothActivity;

/**
 * Created by squall on 2016/4/11.
 */
public class CircleActivity4WebSite extends CircleTagSmoothActivity {
    private String from_path;

    @Override
    protected void initArgs() {
        super.initArgs();
        try {
            from_path = getIntent().getData().getPath();
            setWebParmas();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    private void setWebParmas() {
        try {
            String[] paths = from_path.split("/");
            if (paths[1].equals("circle")) {
                id = paths[paths.length - 1];
                type = "work";
            } else if (paths[1].equals("tags")) {
                type = "tag";
                name = paths[paths.length - 1];
                from = getIntent().getData().getQueryParameter("filter").equals("group") ? 1 : 0;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onEventHappen(int eventCode, String message, Object object) {
        super.onEventHappen(eventCode, message, object);
    }
}
